package cn.caplike.demo.repository.java;

import java.math.BigDecimal;

/**
 * Description: 对象初始化
 *
 * @author LiKe
 * @version 1.0.0
 * @date 2020-12-12 11:23
 */
public class ObjectInitialization {

    public static void main(String[] args) {
        final Subject subject = new Subject();
        System.out.println("boolean: " + subject.get_byte());
        System.out.println("byte: " + subject.get_byte());
        System.out.println("long: " + subject.get_long() + "; " + (subject.get_long() == 0));
        System.out.println("Long: " + subject.get_Long());
        System.out.println("short: " + subject.get_short());
    }

}

class Subject {

    private int _int;

    private String _string;

    private byte _byte;

    private boolean _boolean;

    private BigDecimal _bigDecimal;

    private long _long;

    private Long _Long;

    private short _short;

    public int get_int() {
        return _int;
    }

    public void set_int(int _int) {
        this._int = _int;
    }

    public String get_string() {
        return _string;
    }

    public void set_string(String _string) {
        this._string = _string;
    }

    public byte get_byte() {
        return _byte;
    }

    public void set_byte(byte _byte) {
        this._byte = _byte;
    }

    public boolean is_boolean() {
        return _boolean;
    }

    public void set_boolean(boolean _boolean) {
        this._boolean = _boolean;
    }

    public BigDecimal get_bigDecimal() {
        return _bigDecimal;
    }

    public void set_bigDecimal(BigDecimal _bigDecimal) {
        this._bigDecimal = _bigDecimal;
    }

    public long get_long() {
        return _long;
    }

    public void set_long(long _long) {
        this._long = _long;
    }

    public Long get_Long() {
        return _Long;
    }

    public void set_Long(Long _Long) {
        this._Long = _Long;
    }

    public short get_short() {
        return _short;
    }

    public void set_short(short _short) {
        this._short = _short;
    }
}
